//统一处理分类导航请求
import {getCategoryAPI} from "@/apis/layout.js";
import {ref} from "vue";
import {defineStore} from "pinia";

export const useCategoryStore = defineStore('category',() => {

  const categoryList = ref([])

  const getCategory = async () => {
    const response = await getCategoryAPI();
    categoryList.value = response.data.result
  }

  return {
    getCategory,
    categoryList
  }
})
